package com.tiantianfresh.model.dao;

import com.tiantianfresh.model.pojo.Rotationchart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/**
@author FANGAO
@date 2021/11/20 - 下午 15:20
*/
public interface RotationchartMapper extends Mapper<Rotationchart> {
    //增加一个轮播图
    int addRotationchart(Rotationchart rotationchart);
    //查询全部轮播图信息  返回list集合
    List<Rotationchart> selectAll();
    //修改r_commodity的上下架状态
    @Update("update r_commodity set commodityorder=#{commodityorder} where cid=#{id}")
    int deleteRotationchartById(Map<String,Integer> map);
    //根据id更新
    int updateRotationchart(Rotationchart rotationchart);
    //根据id查询 返回一个Rotationchart
    Rotationchart queryRotationchartById(@Param("id") int id);
    //删除轮播图
    @Delete("delete from r_rotationchart where id = #{id}")
    int deltePermission(@Param("id") Integer id);
}
